<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>技术合同审核</title>
<script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res_app}/js/app/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res}/js/projectapp/prjpublic.js"></script>
</head>
<body>
	<div class="soBox">
		<div class="detail ico_search">
		<div class="text">
			<table>
				<tr>
					<td>
						<cpt:search key="techctrorg_list"  repeatColumn="3" displayCount="8" leftStyle="width:100px"></cpt:search>
					</td>
				</tr>
				<tr>
				<td>
					<div class="clear_h10"></div>
					<input type='button' id='searchBt' class="button_an" value='查询'/>
				</td>
				</tr>
			</table>
			</div>
		</div>
	</div>
	<div class="clear_h10"></div>
	<div>
		<div id='TopBarMnt'></div>
		<table id='dataGrid'></table>
		<div id='dataBar'></div>
	</div>
	<input type="hidden" id="checkedStatus" name="checkedStatus" value="" />
	<script type="text/javascript">
		$(document).ready(function() {
			buildGrid();
		});
		var irisGrid = new IrisGrid("dataGrid", "dataBar", 'TopBarMnt');
		var prcWin = new progressWin("${res}");//初始化遮罩层
		/** 表格初始化**/
		function buildGrid() {
			var columnAttrList = new Array();
			
			columnAttr = new ColumnAttr("合同名称", "zhTitle","zhTitle", 1, "left", true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("买方名称", "buyerName","sellerTypeName", 1, "left", true);//表头，字段名，，，宽度比例，居左，是否需要表头排序
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("卖方名称", "sellerName","sellerName", 1, "left", true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("登记机构", "regName","regName", 1, "center", true);
			columnAttrList.push(columnAttr);
			
			/* columnAttr = new ColumnAttr("业务类型", "grantName","grantName", 1, "left", true);
			columnAttrList.push(columnAttr); */
			/* columnAttr = new ColumnAttr("负责人", "zhName","zhName", 1, "center", true);
			columnAttrList.push(columnAttr); */
			/* columnAttr = new ColumnAttr("申报单位", "orgName","orgName", 1, "left", true);
			columnAttrList.push(columnAttr); */
			/* columnAttr = new ColumnAttr("申报年度", "statYear", "statYear", 1,"center", true);
			columnAttrList.push(columnAttr); */
			
			columnAttr = new ColumnAttr("申请合同金额", "proCtrAmt","proCtrAmt", 1, "center", true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("申请技术交易额", "proTechAmt","proTechAmt", 1, "center", true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("批复合同金额", "pfCtrAmt","pfCtrAmt", 1, "center", true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("批复技术交易额", "pfTechAmt","pfTechAmt", 1, "center", true);
			columnAttrList.push(columnAttr);
			columnAttr = new ColumnAttr("合同类型", "ctrTypeName","ctrTypeName", 1, "center", true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("状态", "statusName","statusName", 1, "left", true);
			columnAttrList.push(columnAttr);
						
			columnAttr = new ColumnAttr("审核意见", "comment", "comment", 1,"center", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("PDF", "pdf", "pdf",1,"center", false);
			columnAttrList.push(columnAttr);
			
			if("${roleId}"==14||"${roleId}"==26){
				columnAttr = new ColumnAttr("操作", "", "", 2,"center", false);
				columnAttrList.push(columnAttr);
			}

			irisGrid.setColumnAttrs(columnAttrList);
			irisGrid.setUrl("${ctx}/prpapprove/techctrorg_list");//查询url
			irisGrid.setCaption("暂写");
			irisGrid.setDefaultSortName("posCode");//默认排序字段
			irisGrid.setDefaultSortorder("desc");
			irisGrid.setWidth(978);//整个表格宽度
			irisGrid.setShowRowIndex(true);//是否显示行号
			irisGrid.setQueryBox('searchBt', 'techctrorg_list');//后面的参数是“项目验收情况”跳转过来带的参数
			irisGrid.build();
		}
		
		var getSelOpt = function() {
			var g = "";
			$("input:checkbox[id^=jqg_dataGrid_]").each(function(i, obj) {
				if (obj.checked) {
					g += "," + obj.id.replace("jqg_dataGrid_", "");
				}
			});
			if (g != "") {
				g = g.substring(1);
			}
			return $.trim(g);
		};
		
		function printRegNo(prpCode){
			var url = "${ctx}/prpapprove/techctrorgInfo?prpCode="+prpCode+"&TB_iframe=true&height=560&width=850";
			tb_show("广东省技术合同认定登记证明", url, false);
		}
		
		function prpApprove(prpCode,grantCode,status){
			var url = "${ctx}/prpapprove/prp-pass?prpCodes="+prpCode+"&grantCode="+grantCode+"&status="+status+"&TB_iframe=true&height=560&width=850";
			tb_show("审核通过意见（最多为500字）", url, false);
		}
		
		function viewComment(des3Prpcode){
			var url="${ctx}/proposal/view/audit-comment-view?posCode="+des3Prpcode+"&TB_iframe=true&height=390&width=720";
			tb_show("审核意见", url, false);
		}
	</script>
</body>
</html>